package com.esp.app.brightness;

import com.esp.app.widget.R;

import android.content.Context;
import android.provider.Settings;
import android.util.Log;

public class BrightnessModel {
	
	public static String TAG = BrightnessModel.class.getCanonicalName();
	public final static String BRIGHTNESS_CHANGED_ACTION = "com.esp.app.brightness.changedBrightness";
	
	public static int getBrightness(Context context){
		int brightness = Settings.System.getInt(context.getContentResolver(), "screen_brightness",128);
		Log.v(TAG,"getBrightness Level :|=> " +  brightness);
		if(brightness <= 1)
			return R.drawable.brightness_low;
		else if(brightness <= 128)
			return R.drawable.brightness_medium;
		else if(brightness <= 192)
			return R.drawable.brightness_high;
		else return R.drawable.brightness_high;
	}
	
	
	
	
}
